package model

import "errors"

type Pipe interface {
	PutTask(task *Task) error
}

type ArraysPipe struct {
	taskList *[]Task
	name string
	params map[string]string
	result interface{}
}

func (ap *ArraysPipe) TaskList() *[]Task  {
	return ap.taskList
}

func (ap *ArraysPipe) PutTask(task *Task)  error {
	if nil == task {
		return errors.New("Task can't be empyt")
	}
	*ap.taskList = append(*ap.taskList,*task)
	return nil
}



